<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">
    <h:head>
        <title>Login Administrator</title>
    </h:head>
    <h:body style="background-color: #2E5E79;">
        <h:inputHidden  value="#{staffController.IsLogged()}"/>
        <h:form>  
            <table style="background-color: #fff; margin: 10% auto;border: 2px solid blue;">
                <tr>
                    <td colspan="2">
                        <h:messages errorStyle="color: red" infoStyle="color: green" layout="list"/>
                    </td>
                </tr>
                <tr>
                    <td>
                        <h:outputLabel for="username" value="Username:" />  
                    </td>
                    <td>
                        <h:inputText value="#{staffController.selected.userName}" required="true" requiredMessage="#{bundle.CreateStaffRequiredMessage_userName}"   
                                     id="username" label="username" />  
                    </td>
                </tr>
                <tr>
                    <td>
                        <h:outputLabel for="password" value="Password:" /> 
                    </td>
                    <td>
                        <h:inputSecret value="#{staffController.selected.password}" title="#{bundle.CreateStaffTitle_password}" requiredMessage="#{bundle.CreateStaffRequiredMessage_password}"   
                                       id="password" required="true" label="password" />  
                    </td>
                </tr>
                <tr>
                    <td>
                        <h:commandButton id="loginButton" action="#{staffController.checkLogin()}" value="Login"/>  
                    </td>
                </tr>
            </table>
        </h:form> 
    </h:body>
</html>

